<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container{
            width: 1200px;
            margin: 0 auto;
        }
        .content{
            list-style: none;
           
        }
        .list {
            width: 100%;
            height: 270px;
            display: flex;/* 让元素在一行排列*/
            gap: 15px; /* 元素间距 */
            flex-wrap: wrap; /* ✅ 允许换行 */
            list-style-type: none;
          
        }
        .list li {
            transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .list li:hover {
            transform: translateY(-8px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1); /* 添加投影增强立体感 */
        }
        img {
            width: 228px;
            height: 150px;
        }
        a {
            display: block;
            text-decoration: none;
        }
        h3 {
            font-size: 16px;
            font-weight: 400;
            width: 228px;
            margin: 10px 0;
            color: #333;
        }
        span {
            font-size: 12px;
        }
        
    </style>
</head>
<body>
    <div class="container">
        <div class="title">
            <h4>精品推荐</h4>
        </div>
        <div class="content">
            <ul  class="list">
                <!-- <li>
                    <a href="#">
                        <img src="x1.jpg" alt="">
                        <h3>Think PHP 5.0博客系统实战项目演练</h3>
                        <span>高级</span>·<span>1125人在学习</span>
                
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img src="x1.jpg" alt="">
                        <h3>Think PHP 5.0博客系统实战项目演练</h3>
                        <span>高级</span>·<span>1125人在学习</span>
                
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img src="x1.jpg" alt="">
                        <h3>Think PHP 5.0博客系统实战项目演练</h3>
                        <span>高级</span>·<span>1125人在学习</span>
                
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img src="x1.jpg" alt="">
                        <h3>Think PHP 5.0博客系统实战项目演练</h3>
                        <span>高级</span>·<span>1125人在学习</span>
                
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img src="x1.jpg" alt="">
                        <h3>Think PHP 5.0博客系统实战项目演练</h3>
                        <span>高级</span>·<span>1125人在学习</span>
                
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img src="x1.jpg" alt="">
                        <h3>Think PHP 5.0博客系统实战项目演练</h3>
                        <span>高级</span>·<span>1125人在学习</span>
                
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img src="x1.jpg" alt="">
                        <h3>Think PHP 5.0博客系统实战项目演练</h3>
                        <span>高级</span>·<span>1125人在学习</span>
                
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img src="x1.jpg" alt="">
                        <h3>Think PHP 5.0博客系统实战项目演练</h3>
                        <span>高级</span>·<span>1125人在学习</span>
                
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img src="x1.jpg" alt="">
                        <h3>Think PHP 5.0博客系统实战项目演练</h3>
                        <span>高级</span>·<span>1125人在学习</span>
                
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img src="x1.jpg" alt="">
                        <h3>Think PHP 5.0博客系统实战项目演练</h3>
                        <span>高级</span>·<span>1125人在学习</span>
                
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img src="x1.jpg" alt="">
                        <h3>Think PHP 5.0博客系统实战项目演练</h3>
                        <span>高级</span>·<span>1125人在学习</span>
                
                    </a>
                </li> -->
                <script>
                    let data=[{
                        src: 'x1.jpg',
                        title: 'Think PHP 5.0博客系统实战项目演练',
                        
                        study: 1125
                    },{
                        src: 'x1.jpg',
                        title: 'javaweb实战演练',
                       
                        study: 5500
                    },{
                        src: 'x1.jpg',
                        src: 'x1.jpg',
                        title: '登录页面实战演练',
                        
                        study: 666
                    },{
                        src: 'x1.jpg',
                        title: 'Think PHP 5.0博客系统实战项目演练',
                        
                        study: 85520
                    },{
                        src: 'x1.jpg',
                        title: 'Think PHP 5.0博客系统实战项目演练',
                        
                        study: 2250
                    },{
                        src: 'x1.jpg',
                        title: 'htmlcss商城实战',
                        
                        study: 63320
                    },{
                        src: 'x1.jpg',
                        title: 'UNITY从入门到精通',
                        
                        study: 486
                    },{
                        src: 'x1.jpg',
                        title: 'JavaScript从入门到精通',
                        
                        study: 693
                    },{
                        src: 'x1.jpg',
                        title: '网络动态图片加载',
                        
                        study: 475520
                    },{
                        src: 'x1.jpg',
                        title: 'Angular2前端商城实战演练',
                        study: 6000
                    }]
                    for(let i=0;i<data.length;i++){
                        document.write(`
                            <li>
                                <a href="#">
                                    <img src="${data[i].src}" alt="">
                                    <h3>${data[i].title}</h3>
                                    <span>高级</span>·<span>${data[i].study}人在学习</span>
                            
                                </a>
                            </li>
                        `)
                    }
                </script>
            </ul>
            
        </div>
    </div>
</body>
</html>